package com.rf.richfitwheel.admin.sys.dao;

import com.rf.richfitwheel.admin.sys.model.RoleMenu;
import com.rf.richfitwheel.admin.sys.model.RoleMenuExample;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

public interface RoleMenuMapper {
    long countByExample(RoleMenuExample example);

    int deleteByExample(RoleMenuExample example);

    int deleteByPrimaryKey(String id);

    int insert(RoleMenu record);

    int insertSelective(RoleMenu record);

    List<RoleMenu> selectByExample(RoleMenuExample example);

    RoleMenu selectByPrimaryKey(String id);

    int updateByExampleSelective(@Param("record") RoleMenu record, @Param("example") RoleMenuExample example);

    int updateByExample(@Param("record") RoleMenu record, @Param("example") RoleMenuExample example);

    int updateByPrimaryKeySelective(RoleMenu record);

    int updateByPrimaryKey(RoleMenu record);

    /**
     * 根据角色id和租户id删除数据
     * @param param 角色id和租户id
     */
	void deleteByStationIdAndTenantId(Map<String, Object> param);

    /**
     * 根据角色ID和所属模块获取资源权限
     * @param map 参数
     * @return 角色资源关系
     */
	List<RoleMenu> getResTreeByRoleIdAndModuleType(Map<String, Object> map);
    
    /**
     * 查询导航菜单
     * @param param{userId,orgId, modules}
     * @return 导航菜单
     */
    List<Map<String, Object>> getAuthMenusByUserAndModules(Map<String, Object> param);
}